#include "Length.h"    
Length::~Length()
{

}

Length * Length::instance()
{
	static Length x;
	return &x;
}

Object_ptr Length::eval(SQLEvalVisitor *visitor, SQLMethodInvokeExpr *x) {
	if (x->getParameters()->size() != 1) {
		return SQLEvalVisitor::EVAL_ERROR;
	}

	auto it = x->getParameters()->begin();
	std::advance(it, 0);
	SQLExpr_ptr param0 = *it;
	// param0->accept(visitor);

	// Object_ptr  param0Value = param0->getAttributes().get(EVAL_VALUE);
	// if (param0Value == null) {
	// 	return SQLEvalVisitor::EVAL_ERROR;
	// }

	// string_ptr  strValue = param0Value.toString();

	// int result = strValue.length();
	// return result;
	return nullptr;
}


